package io.adrainty.bolee.security.models.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.adrainty.bolee.framework.commons.basic.BaseEntity;
import io.adrainty.bolee.framework.commons.basic.EnableEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/5 上午12:27
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "角色实体")
public class RoleEntity extends BaseEntity {
    
    @Serial
    private static final long serialVersionUID = -3072458473597642868L;

    @Schema(description = "角色名称")
    private String roleName;

    @Schema(description = "角色标识")
    private String label;

    @Schema(description = "排序")
    private Integer sortNo;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "TREE结构：选中资源No")
    private String[] checkedResourceNos;

    @Schema(description = "TREE结构：选中部门No")
    private String[] checkedDeptNos;

    @Schema(description = "人员查询部门：当前人员Id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long userId;

    @Schema(description = "数据范围（0本人  1自定义）")
    private String dataScope;

    @Schema(description = "企业No")
    private String companyNo;

    @Schema(description = "数据状态：0正常 1禁用")
    private EnableEnum dataState;
    
}
